{% extends 'blank.html.twig' %}
{% block body %}
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户管理 <span class="c-gray en">&gt;</span> 用户列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="page-container">
        <div class="text-c">
            <form action="{{ path('adminuser_list') }}" method="get">
		   日期范围：
                <input type="text" name="start_time" class="input-text" id="countTimestart" onfocus="selecttime(1)" value="{{ start_time }}" style="width:120px;" >
                <input type="text" name="end_time" class="input-text" id="countTimestart" onfocus="selecttime(2)" value="{{ end_time }}"  style="width:120px;">
                <input type="text" name="username" id="" value="{{ username }}" placeholder=" 用户名" style="width:250px" class="input-text">
                <button name="" id="search" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>
            </form>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                <a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
                <a class="btn btn-primary radius" href="javascript:;" >
                    <i class="Hui-iconfont">&#xe600;</i> 添加用户</a>
            </span>
            <span class="r">共有数据：<strong>{{ Total }}</strong> 条</span>
        </div>
        <div class="mt-20">
            <table class="table table-border table-bordered table-bg table-hover table-sort table-responsive" >
                <thead>
                <tr>
                    <th>用户名</th>
                    <th>密码</th>
                    <th>qq</th>
                    <th>微信</th>
                    <th>手机</th>
                    <th>邮箱</th>
                    <th>最后登录时间</th>
                    <th>最后登录IP</th>
                    <th>用户状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {% for item in ShowAdminUserData %}
                    <tr class="{{ cycle(['success','warning'],item.id) }}">
                        <th>{{ item.username }}</th>
                        <th>{{ item.password }}</th>
                        <th>{{ item.qq }}</th>
                        <th>{{ item.weixin }}</th>
                        <th>{{ item.telephone }}</th>
                        <th>{{ item.email }}</th>
                        <th>{{ item.lastLoginDate }}</th>
                        <th>{{ item.lastLoginIp }}</th>
                        {% if item.status == 1 %}
                            <th>正常</th>
                        {% elseif item.status == 0 %}
                            <th>失效</th>
                        {% elseif item.status == -1 %}
                            <th>待审核</th>
                        {% endif %}
                        <th></th>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
            <div id="laypage"></div>
        </div>
    </div>
{% endblock %}

{% block footer %}
    {#<script type="text/javascript" src="/AbsSR/web/static/huiadmin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>#}
    <script type="text/javascript" src="/AbsSR/web/static/huiadmin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
    <script type="text/javascript" src="/AbsSR/web/static/huiadmin/lib/laypage/1.2/laypage.js"></script>

    {{parent()}}
    <script type="text/javascript">
        var url = "{{ path('adminuser_list') }}" +"?{{ query }}";
        laypage({
            cont:'laypage',
            pages:'{{ pageTotal }}',
            skin:'#5FB878',
            curr:'{{ curr }}',
            jump:function(obj,first){
                //首次不执行否则会无限的刷新
                if(!first){
                    location.href = url+'&page='+obj.curr;
                }
            }
        });
    </script>

    <script>
        function user_add(title,url,w,h){
            layer_show(title,url,w,h);
        }
    </script>


{% endblock %}
